﻿@using CuongHanh
@using CuongHanh.Configuration
@using CuongHanh.Context
@using CuongHanh.Extensions
@using CuongHanh.Models
@{
    int customerId = Session.GetCustomerId();
    string hello = Html.GetResource("hello");
    string customerName = Session.GetCustomerName();
}
<style type="text/css">
    .div_cart_like {
        float: right;
        position: relative;
    }

    .div_cart_like .div_cart { margin-left: 17px }

    a.div_cart { cursor: pointer; }

    .f_bold {
        color: #ffffff;
        font-size: 13px;
        line-height: 34px;
        margin: 0 10px 0 8px;
    }

    .div_list_cart {
        display: none;
        position: absolute;
        right: 6px;
        top: -5px;
        width: 150px;
        z-index: 3;
    }

    .list_cart_content {
        -webkit-background-clip: padding-box; /* for Safari */
        background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
        background-color: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.1);
        min-height: 32px;
        padding: 15px 2px 0px;
        position: absolute;
        right: 0px;
        top: 35px;
        width: 273px;
    }


    .div_cart .number {
        color: #ef532a;
        float: left;
        font-size: 13px;
        margin-left: 3px;
        margin-top: 15px;
    }

    .div_cart .txt {
        color: #737373;
        float: left;
        font-size: 13px;
        margin-right: 10px;
        margin-top: 5px;
    }

    .div_cart .txt .cl_ye { color: #00afe3 }

    .div_cart_buy .div_list_cart .number { color: #ef532a }


    .div_cart_like:hover .div_list_cart { display: block; }

    .btn_list_cart {
        -webkit-background-clip: padding-box; /* for Safari */
        background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
        background-color: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-bottom: 0;
        height: 35px;
        padding-right: 9px;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 2;
    }

    .btn_list_cart .txt_blue {
        color: #0097db;
        margin-left: 15px;
        margin-top: 0px;
        padding-right: 1px
    }

    .list_cart_content_login {
        min-width: 197px;
        padding-left: 0;
        padding-right: 0;
        width: auto;
    }

    .div_logined li { height: 35px; }

    .div_logined li a {
        cursor: pointer;
        float: left;
        font-size: 13px;
        line-height: 35px;
        padding: 0 20px;
    }

    .div_logined li:hover { background-color: #0097db }

    .div_logined li:hover a { color: #ffffff }

    .div_logined li.logout {
        border-top: 1px solid #e5e5e5;
        margin: 10px 0 10px;
    }

    .div_logined li.logout a { color: #ef532a }

    .div_logined li.logout:hover { background-color: #ef532a }

    .div_logined li.logout:hover a { color: #fff }

    li { list-style: none outside none; }

    .cl_black_2 { color: #737373 }

    .login-link {
        color: #008AC3;
    }
    .login-link:hover {
        color: #ef532a;
    }
</style>
@if(customerId > 0)
{
 <div class="div_cart_like">
       <a class="div_cart ">

           <span class="txt">@hello <font class="cl_ye ">@customerName</font> </span>
       </a>
       <div class="div_list_cart " >
           <a class="div_cart btn_list_cart" href="javascript:void(0);">

               <span class="txt txt_blue f_bold">@hello @customerName</span>
           </a>
           <div class="list_cart_content list_cart_content_login">
               <ul class="div_logined">
                   <li><a class="cl_black_2" href="@UrlManager.GetLinkByUrl(LinkConfig.DOI_MAT_KHAU)">Đổi mật khẩu</a></li>
                   <li class="logout"><a class="cl_black_2" href="@UrlManager.GetLinkByUrl(LinkConfig.THOAT)">Thoát</a></li>
               </ul>
           </div>
       </div>
   </div>
}
else
{
    <div style="float:right ; margin-top: 5px; margin-right: 10px; ">
        <a class="login-link" href="@UrlManager.GetLinkByUrl(LinkConfig.DANG_NHAP)">@Html.GetResource("signin")</a> /
        <a class="login-link" href="@UrlManager.GetLinkByUrl(LinkConfig.DANG_KY)" >@Html.GetResource("register")</a>
     </div>
}